﻿@model Weibo.Web.Models.FavoriteModel
                                 @{
    var border = "";
    if(Model.CurUserConfig.IsThemeDIY==1){
        ThemeDIY diy = Themes.GetThemeDIYByUID(Model.CurUser.ID);
        border = diy.BorderStyle+"Bg";
    }
    ViewData["curBorder"] = border;
 }
 @{
     Layout = "~/Views/Shared/_Layout.cshtml";
 }
 @{
     ViewBag.Title = "我的收藏 XX微博-随时随地分享身边的新鲜事儿";
 }
  @section  cssInsert{
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/index.css" />
    <link rel="stylesheet" type="text/css" href="@Model.CurSkinCss" />
    <link rel="stylesheet" type="text/css" href="/Content/CSS/miniblog/layer.css" />
    }
 @section  jsInsert{ 
    <script type="text/javascript">
        var curBorder = "@border";
    </script>
    <script src="/Swfupload/swfupload.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.cookies.js" type="text/javascript"></script>
    <script src="/Swfupload/swfupload.queue.js" type="text/javascript"></script>
    <script src="/Swfupload/fileprogress.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Swfupload/handler.js" type="text/javascript" charset="GB2312"></script>
    <script src="/Scripts/MiniBlog.js" type="text/javascript"></script>
    <script src="/Scripts/DatePicker.js" type="text/javascript"></script>

    }

            <div class="MIB_blogbody">
                <div class="MIB_mblogbgr @border">
                    <div class="MIB_mblogbgl">
                        <div class="mainR MIB_200 MIB_txtar MIB_linkar">
                              @RenderPage("~/Views/Shared/_userInfo.cshtml")
                             @RenderPage("~/Views/Shared/_rightNav.cshtml") 
                             @RenderPage("~/Views/Shared/Wedget_MyFan.cshtml")
                             @RenderPage("~/Views/Shared/Wedget_MyFollow.cshtml")
                        </div>
                        <div id="indexMainL" class="mainL MIB_600 MIB_txtal MIB_linkal">
                            <div class="MIB_mbloghead">
                                <div class="MIB_mblogbox">
                                    <div class="postWrap">
                                        <div class="pngBg">
                                            <div class="postOptionBg">
                                            </div>
                                            <div class="pngGuidBg">
                                            </div>
                                            <div class="pngAreaBg">
                                            </div>
                                        </div>
                                        <div class="connBg">
                                            <div id="publisher_info" class="wordNumBg">
                                                你还可以输入<span class="pipsLim">140</span>字</div>
                                            <div class="postOptionBg">
                                                <div id="publisher_faces" class="OnTit">
                                                    <img title="表情" class="small_icon faceicon" src="/Content/Image/transparent.gif">
                                                    <a tabindex="2" href="javascript:void(0)">表情</a>
                                                </div>
                                                <div id="publisher_pic" class="OnPic">
                                                    <span poptype="1" pop="true" id="publisher_image">
                                                        <img title="图片" class="small_icon picnormal" src="/Content/Image/fbqimgclose.gif"><a
                                                            tabindex="3" href="####">图片</a> </span>
                                                </div>
                                                <div id="publisher_video" class="OnTit">
                                                    <img class="small_icon videoicon" title="视频" src="/Content/Image/transparent.gif"><a
                                                        tabindex="4" href="javascript:void(0);">视频</a>
                                                </div>
                                                <div id="publisher_music" class="OnTit">
                                                    <img class="small_icon musicico" title="音乐" src="/Content/Image/transparent.gif"><a
                                                        tabindex="5" href="javascript:void(0);">音乐</a>
                                                </div>
                                                <div id="publisher_topic" class="OnTit">
                                                    <img class="small_icon askico" title="话题" src="/Content/Image/transparent.gif"><a
                                                        tabindex="6" href="javascript:void(0);">话题</a>
                                                </div>
                                                <div class="OnTit" id="publisher_vote">
                                                    <img src="/Content/Image/transparent.gif" class="small_icon voteicon" title="投票"><a
                                                        tabindex="7" href="javascript:void(0);">投票</a>
                                                </div>
                                            </div>
                                            <div class="postBtnBg bgColorA_No">
                                                <a title="" tabindex="8" id="publisher_submit" href="javascript:void(0);"></a>
                                            </div>
                                            <div style="display: block" class="inputarea">
                                                <label style="display: none;" for="publish_editor">
                                                    微博输入框</label>
                                                <textarea title="" id="publish_editor" rows="" cols="" name="" accesskey="1" tabindex="1"
                                                    style="font-family: Tahoma,宋体; border-style: solid; border-width: 0px; word-wrap: break-word;
                                                    font-size: 14px; line-height: 18px; overflow-x: hidden;" range="0&0"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="MIB_mbloglist">
        <div id="feed_title" class="titlebar">
        @{
            if(string.IsNullOrEmpty(Model.Key))
            {
								<div class="lf font_14">我的收藏(共<em>@{@Model.RecordCount}</em>条)</div>
            }
            else{
            <div class="lf font_14"><a href="/MiniBlog/Fav">返回全部收藏</a>(共<em>@{@Model.RecordCount}</em>条)</div>
            }
            }
								<div class="rt">
										    <label><input type="text" name="searchkeyword" id="searchkeyword" value="@(string.IsNullOrEmpty(Model.Key) ? "查找收藏" : Model.Key)"  class="test" style="color: rgb(153, 153, 153);">
										    <a class="btn_normal btnxs" id="search_btn" href="javascript:;"><em>搜索</em></a>
										    </label>
                              
                                </div>
                                <script type="text/javascript">
                                    var favSearch = function () {
                                        if ($("#searchkeyword").val() != "查找收藏" && $.trim($("#searchkeyword").val())) {
                                            window.location.href = App.AddQueryToUrl(window.location.href, "Key", encodeURIComponent($.trim($("#searchkeyword").val()))); 
                                        }
                                    };
                                    $("#searchkeyword").JQP_HighLineInput2({ nullCon: "查找收藏" }).keyup(function (e) {
                                        if (e.which == 13) {
                                            favSearch();
                                        }
                                    });
                                    $("#search_btn").click(function () {
                                        favSearch();
                                    });
                                </script>
							</div>
                                <ul id="feed_list" class="MIB_feed" iswrite="1" _num="15">
                                    @{
                                        if (Model.MiniBlogs != null)
                                        {
                                            foreach (Weibo.Entity.Favorite m in Model.MiniBlogs)
                                            {
                                                if (m != null)
                                                {
                                                    var dateSpan = DateSpan.Get(m.CreateTime);
                                                    From from = Froms.GetFromByID(m.FromID);
                                                    var user = Users.GetUserByID(m.UID);
                                                    var content = MiniBlogs.BBCodeToHtml(m.RealContent);
                                                    string[] media = m.MediaContent.Split(',');
                                                    if (user != null)
                                                    {
                                        <li id="mid_@{@m.ID;}" class="MIB_linedot_l">
                                            <div class="head_pic">
                                                <a href="/@{@user.ID;}" uid="@{@user.ID;}" namecard="true" uname="@{@user.NickName;}" >
                                                    <img src="@{@user.MidAvartar;}" 
                                                    title="@{@user.NickName;}" /></a>
                                            </div>
                                            <div class="MIB_feed_c">
                                                <p class="MIB_txtbl">收藏于：@{@DateSpan.Get(m.FavoriteTime);}</p>
                                                <p  mid="@{@m.ID;}" class="sms"><a title="@{@user.NickName;}" href="/@{@user.ID;}" uid="@{@user.ID;}" namecard="true"  uname="@{@user.NickName;}">@{@user.NickName;}</a>：@{@MvcHtmlString.Create(string.IsNullOrEmpty(Model.Key)?content:HighLineHelper.HighLine(content,Model.Key));}
                                                </p>
                                                @{
                                                                                                                                                                                                                                                         if (m.IsOriginal == 1 && m.OriginalMID < 0)
                                                                                                                                                                                                                                                         {
                                                    <div id="prev_@{@m.ID;}" class="feed_preview" style="">
                                                        @{
                                                                         if (media[0] != "-1")
                                                                         {

                                                            <div class="feed_img">
                                                                <a href="javascript:;" onclick="App.scaleImg(this,'@{@m.ID;}');return false;">
                                                                    <img  class="imgicon" src="@{@media[4];}" /></a>
                                                                <img src="/Content/Image/loading.gif" style="position: absolute; background-color: transparent;
                                                                    border: 0px none; width: 16px; height: 16px; z-index: 1001; display: none;" />
                                                            </div>
                                                                         }
                                                                         if (media[1] != "-1")
                                                                         {
    
                                                            <div class="feed_img" type="video" vid="@{@media[1];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img width="120" height="90" style="cursor: pointer;" class="imgicon"
                                                                    src="@{@media[5];}" /></a><img src="/Content/Image/feedvideoplay.gif" onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);" style="cursor: pointer;
                                                                        display: block; margin-top: -61.5px; margin-left: 43.5px; opacity: 0.5; filter: alpha(opacity=50);" /></div>
                                                             
                                                                         }
                                                                         if (media[2] != "-1")
                                                                         {
                                                            <div class="feed_img" type="music" musicid="@{@media[2];}" mid="@{@m.ID;}" style="width: 135px; height: 33px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="/Content/Image/music_s.gif" /></a></div>
                                                                         }
                                                                         if (media[3] != "-1")
                                                                         {
                                                                             if (!string.IsNullOrEmpty(media[6]))
                                                                             {
                                                            <div class="feed_img" type="vote" voteid="@{@media[3];}" mid="@{@m.ID;}" >
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="@{@media[6];}" /></a><img  onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);" src="/Content/Image/vote_picicon_01.gif"
                                                                        style="cursor: pointer; display: none;
                                                                        opacity: 0.5; filter: alpha(opacity=50);"></div>
                                                                             }
                                                                             else
                                                                             {
                                                        
                                                            <div class="feed_img" type="vote" voteid="@{@media[3];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                <a onclick="return false;" href="javascript:void(0);">
                                                                    <img style="cursor: pointer;" class="imgicon" src="/Content/Image/vote_pic_01.gif" /></a></div>
                                                                             }
                                                                         }
                                                        }
                                                        <div class="clear">
                                                        </div>
                                                    </div>
                                                    <div style="display: none;" id="disp_@{@m.ID;}" class="MIB_assign">
                                                    </div>
                                                                                                                                                                                                                                                         }
                                                                                                                                                                                                                                                         else
                                                                                                                                                                                                                                                         {
                                                                                                                                                                                                                                                             MiniBlog oriMBlog = MiniBlogs.GetMiniBlogByID(m.OriginalMID);
                                                                                                                                                                                                                                                             if (oriMBlog != null)
                                                                                                                                                                                                                                                             {
                                                                                                                                                                                                                                                                 var odateSpan = DateSpan.Get(oriMBlog.CreateTime);
                                                                                                                                                                                                                                                                 From ofrom = Froms.GetFromByID(oriMBlog.FromID);

                                                                                                                                                                                                                                                                 var ocontent = MiniBlogs.BBCodeToHtml(oriMBlog.RealContent);
                                                                                                                                                                                                                                                                 string[] omedia = oriMBlog.MediaContent.Split(',');
                                                                                                                                                                                                                                                                 User oriUser = Users.GetUserByID(oriMBlog.UID);
                                                                                                                                                                                                                                                                 if (oriUser != null)
                                                                                                                                                                                                                                                                 {
                                                                                                     
                                                    <div class="MIB_assign">
                                                        <div class="MIB_asarrow_l">
                                                        </div>
                                                        <div class="MIB_assign_t">
                                                        </div>
                                                        <div class="MIB_assign_c MIB_txtbl">
                                                            <p  mid="@{@m.ID;}" class="source"><a href="/@{@oriUser.ID;}" uid="@{@oriUser.ID;}" namecard="true" uname="@{@oriUser.NickName;}" >@@@{@oriUser.NickName;}</a>：@{@MvcHtmlString.Create(string.IsNullOrEmpty(Model.Key)?ocontent:HighLineHelper.HighLine(ocontent,Model.Key));}</p>
                                                            <div id="prev_@{@m.ID;}" class="feed_preview" mbind="1" style="">
                                                                @{
                                                                                 if (omedia[0] != "-1")
                                                                                 {

                                                                    <div class="feed_img">
                                                                        <a href="javascript:;" onclick="App.scaleImg(this,'@{@m.ID;}');return false;">
                                                                            <img vimg="1" class="imgicon" src="@{@omedia[4];}" /></a>
                                                                        <img src="/Content/Image/loading.gif" style="position: absolute; background-color: transparent;
                                                                            border: 0px none; width: 16px; height: 16px; z-index: 1001; display: none;" />
                                                                    </div>
                                                                                 }
                                                                                 if (omedia[1] != "-1")
                                                                                 {
                                                                    <div class="feed_img" type="video" vid="@{@omedia[1];}" mid="@{@m.ID;}" style="width: 120px; height: 90px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img width="120" height="90" style="cursor: pointer;" class="imgicon"
                                                                    src="@{@omedia[5];}" /></a><img src="/Content/Image/feedvideoplay.gif" onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);"  style="cursor: pointer;
                                                                        display: block; margin-top: -61.5px; margin-left: 43.5px; opacity: 0.5; filter: alpha(opacity=50);" /></div>
                                                                                 }
                                                                                 if (omedia[2] != "-1")
                                                                                 {
                                                                    <div class="feed_img" type="music" musicid="@{@omedia[2];}" mid="@{@m.ID;}" style="width: 135px; height: 33px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="/Content/Image/music_s.gif" /></a></div>
                                                                                 }
                                                                                 if (omedia[3] != "-1")
                                                                                 {
                                                                                     if (!string.IsNullOrEmpty(omedia[6]))
                                                                                     {
                                                                    <div class="feed_img" type="vote" voteid="@{@omedia[3];}" mid="@{@m.ID;}" >
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="@{@omedia[6];}" /></a><img onmouseover="App.mouseoverIco(this);" onmouseout="App.mouseoutIco(this);"  src="/Content/Image/vote_picicon_01.gif"
                                                                                style="cursor: pointer; display: none;
                                                                                opacity: 0.5; filter: alpha(opacity=50);"></div>
                                                                                     }
                                                                                     else
                                                                                     {
                                                        
                                                                    <div class="feed_img" type="vote" voteid="@{@omedia[3];}" mid="@{@m.ID;}"  style="width: 120px; height: 90px;">
                                                                        <a onclick="return false;" href="#">
                                                                            <img style="cursor: pointer;" class="imgicon" src="/Content/Image/vote_pic_01.gif" /></a></div>
                                                                                     }
                                                                                 }
                                                                }
                                                                <div class="clear">
                                                                </div>
                                                            </div>
                                                            <div style=" display: none;" id="disp_@{@m.ID;}" class="blogPicOri">
                                                            </div>
                                                            <div class="feed_att MIB_linkbl MIB_txtbl">
                                                                <div class="lf">
                                                                    <cite><a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}"><strong>
                                                                        @{@odateSpan;}
                                                                    </strong></a></cite><strong>来自</strong><cite><a
                                                                            target="_blank" href="@{@ofrom.FromUrl;}">@{@ofrom.FromName;}
                                                                    </a></cite>
                                                                </div>
                                                                <div class="rt">
                                                                    <a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}">转发@{
                                                                                                                 if (oriMBlog.QuoteCount > 0)
                                                                                                                 {<strong type="rttCount">(@{@oriMBlog.QuoteCount;})</strong>
                                                                                                                 }
                                                                        }
                                                                    </a><span class="MIB_line_l">|</span> <a  href="/@{@oriUser.ID;}/@{@oriMBlog.IDCode;}">
                                                                        评论@{
                                                                                                                                                       if (oriMBlog.CommentCount > 0)
                                                                                                                                                       {<strong type="commtCount" >(@{@oriMBlog.CommentCount;})</strong>
                                                                                                                                                       }
                                                                        }
                                                                    </a>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="MIB_assign_b">
                                                        </div>
                                                    </div>
                                                                                                                                                                                                                                                                 }
                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                             else
                                                                                                                                                                                                                                                             {
                                                    <div class="MIB_assign">
                                                        <div class="MIB_asarrow_l">
                                                        </div>
                                                        <div class="MIB_assign_t">
                                                        </div>
                                                        <div class="MIB_assign_c MIB_txtbl">
                                                            <p class="source">
                                                                该微博已被删除</p>
                                                        </div>
                                                        <div class="MIB_assign_b">
                                                        </div>
                                                    </div>
                                                                                                                                                                                                                                                             }
                                                                                                                                                                                                                                                         }
                                                }
                                                <!-- 转发 -->
                                                <!-- 转发 -->
                                                <div class="feed_att MIB_linkbl MIB_txtbl">
                                                    <div class="lf">
                                                        <cite><a  href="/@{@user.ID;}/@{@m.IDCode;}"><strong>
                                                            @{@dateSpan;}
                                                        </strong></a></cite><strong>来自</strong><cite><a
                                                                 target="_blank" href="@{@from.FromUrl;}">@{@from.FromName;}
                                                        </a></cite>
                                                    </div>
                                                    <div class="rt">
                                                        <!-- 转发 -->
                                                        @{
                                                                                                                          if (user.ID == Model.CurUser.ID)
                                                                                                                          {
                                                            <strong><a onclick="App.miniblogDel('@{@m.ID;}',this)" href="javascript:void(0);"><strong>
                                                                删除</strong></a><span class="MIB_line_l">|</span></strong>
                                                                                                                          }
                                                        }
                                                        <a onclick="App.showFeedDiv('@{@m.ID;}',@{@m.IsOriginal;},'@{@m.OriginalMID;}');return false;"
                                                            href="javascript:void(0);"><strong lang="CD0023">转发</strong>@{
                                                                                                                                   if (m.QuoteCount > 0)
                                                                                                                                   {<strong type="rttCount"id="num_@{@m.ID;}">(@{@m.QuoteCount;})</strong>
                                                                                                                                   }
                                                            }
                                                        </a>
                                                        <!-- 转发 -->
                                                        <span class="MIB_line_l">|</span> <a type="fav" onclick="App.AddFavorite(@{@Model.CurUser.ID},@{@m.ID;},this);return false;"
                                                            href="javascript:void(0);"><strong lang="CL1003">取消收藏</strong></a>
                                                        <!-- 评论 -->
                                                        <span class="MIB_line_l">|</span> <a onclick="App.InsertCommentBox('@{@m.ID;}','@{@user.ID}')"
                                                            href="javascript:void(0);" id="comment_count_@{@m.ID;}"><strong>评论</strong>@{
                                                                                                                if (m.CommentCount > 0)
                                                                                                                {<strong>(@{@m.CommentCount;})</strong>
                                                                                                                }
                                                            }
                                                        </a>
                                                        <!-- 评论 -->
                                                    </div>
                                                </div>
                                                <div id="comment_list_@{@m.ID;}">
                                                </div>
                                            </div>
                                        </li>
                                                    }
                                                }
                                            }
                                        }
                                    }
                                </ul>
                                <div class="MIB_bobar">
                                @Html.Pager(Model.Page,Model.RecordCount,Model.PageSize)
                                </div>
                                <script type="text/javascript">
                                    var as = $("a[type='fav']");
                                    for (var i = 0; i < as.length; i++) {
                                        as[i].isFav = true;
                                    }
                                </script>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


